<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Employee(name, age) {
            this.name = name
            this.age = age
        }
        Employee.prototype.say = function () {
            console.log(this.name, this.age);
        }
        var employee = new Employee("张三", 18);
        console.log(employee);
        employee.say()
    </script>
</body>

</html>